package edu.sctu.practice.class02.mengyao.text09;

/**
 * Created by Administrator on 2015/10/14.
 */
public class Number {
    int number1;
    int number2;
    double resultOfDivision;
    int resultOfReduce;

    public int multiplication() {
        int resultOfMultiplication = number1 * number2;
        return resultOfMultiplication;
    }

    public int add() {
        int resultOfAdd = number1 * number2;
        return resultOfAdd;
    }

    public double division() {
        if (number1 != 0) {
            float resultOfDivision = number1 / number2;
        } else {
            float resultOfDivision = number2 / number1;
        }
        return resultOfDivision;
    }

    public int reduce() {
        if (number1 > number2) {
            int resultOfReduce = number1 - number2;
        } else {
            int resultOfReduce = number2 - number1;
        }
        return resultOfReduce;
    }

    public static void main(String[] args) {
        Number number = new Number();
        number.multiplication();
        number.add();
        number.division();
        number.reduce();
    }
}
